package com.baosaas.api.baseInfo.service.impl;

import com.alibaba.fastjson.JSON;
import com.baosaas.api.baseInfo.util.HttpPostConnect;
import com.baosaas.api.baseInfo.util.RequestUtils;

import java.util.HashMap;

public class test {
    public static void main(String[] args0) {


//        GateControlServiceImpl s = new GateControlServiceImpl();
//        Object o = s.queryTaskList("0301", "沪A12345");
//        System.out.print(o);

        try {
//            String address = "http://api.baosaas.com/Api4STM/ws/WsApi4STMRev!callCommonServer.action";
//            String address = "http://10.60.231.115:8888/Api4STM/ws/WsApi4STMRev!callCommonServer.action";
            String address = "http://10.60.216.172:8888/Api4STM/ws/WsApi4STMRev!callCommonServer.action";
//            HashMap<String, String> map = new HashMap<>();
//            map.put("deptId", "MDMwMQ==");
//            map.put("startDate", "");
//            map.put("endDate", "");
//            map.put("requestType","1");
//            String result = HttpPostConnect.simplePostJson(address, JSON.toJSONString(RequestUtils.getHeader("GetVehicles")), JSON.toJSONString(map));

            HashMap<String, String> map = new HashMap<>();
            map.put("deptId", "MDMwMQ==");
            map.put("vehicle", "京DDF333");
            map.put("accessControlModel", "2");//1为进场，2为出场
            map.put("manageno","6D81ABEFFBD0250AE050007F01000214");
            String result = HttpPostConnect.simplePostJson(address, JSON.toJSONString(RequestUtils.getHeader("SubmitVehicleInfo")), JSON.toJSONString(map));

//            HashMap<String, String> map = new HashMap<>();
//            map.put("deptId", "MDMwMQ==");
//            map.put("vehicle", "京AF0226");
//            map.put("requestType","1");//1进场预约查询 2出场预约查询
//            String result = HttpPostConnect.simplePostJson(address, JSON.toJSONString(RequestUtils.getHeader("GetPlanVehicle")), JSON.toJSONString(map));

        } catch (Exception e) {
            System.out.print(e.getMessage());
        }

    }
}
